package link.xieyu.service;

import link.xieyu.mapper.AppUsersMapper;
import link.xieyu.pojo.AppUsers;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author xieyu
 */
@Service
@RequiredArgsConstructor
public class UsersServiceImpl implements UsersService{
    private final AppUsersMapper appUsersMapper;
    @Override
    public void create(AppUsers users) {
        appUsersMapper.insertSelective(users);
    }

    @Override
    public void update(AppUsers users) {
        appUsersMapper.updateByPrimaryKeySelective(users);
    }

    @Override
    public AppUsers findById(Integer id) {
        return appUsersMapper.selectByPrimaryKey(id);
    }
}
